package org.hot100_0.leetcode283;

public class Solution {
    public void moveZeroes(int[] nums) {
        int n = nums.length;

        int slow =0;
        int fast =0;

        for (; fast < n; fast++) {
            if (nums[fast]!=0){
                nums[slow]=nums[fast];
                slow++;
            }
        }

        for (int i = slow; i <n; i++) {
            nums[i]=0;
        }
    }
}
